package com.gf.forcesystem.service.targetstate;

import com.gf.forcesystem.model.dto.CotaskingTargetState;
import com.gf.forcesystem.api.CotaskingTargetStateService;
import com.gf.forcesystem.websocket.ForceClientWebsocketManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gaofei
 * @date 2022/6/19 19:51
 * 将状态帧广播给客户端
 */
@Service("BroadTargetStateServiceImpl")
public class BroadTargetStateServiceImpl implements CotaskingTargetStateService {
    @Autowired
    ForceClientWebsocketManager forceClientWebsocketManager;

    @Override
    public void deal(CotaskingTargetState cotaskingTargetState) {
        forceClientWebsocketManager.broadcastMessage(cotaskingTargetState);
    }
}
